import java.util.ArrayList;

public class Demo {
    public static void main(String[] args) {
        Manager manager = new Manager();

        // 添加学生数据
        ArrayList<Double> scores1 = new ArrayList<>();
        scores1.add(88.0); scores1.add(98.0); scores1.add(90.0);
        manager.put(new Student("20160001", "孙悟空", 22, scores1));

        ArrayList<Double> scores2 = new ArrayList<>();
        scores2.add(82.0); scores2.add(76.0); scores2.add(91.0);
        manager.put(new Student("20160002", "猪八戒", 26, scores2));

        ArrayList<Double> scores3 = new ArrayList<>();
        scores3.add(91.0); scores3.add(85.0); scores3.add(87.0);
        manager.put(new Student("20160003", "沙和尚", 19, scores3));

        ArrayList<Double> scores4 = new ArrayList<>();
        scores4.add(96.0); scores4.add(99.0); scores4.add(65.0);
        manager.put(new Student("20161119", "唐僧", 20, scores4));

        ArrayList<Double> scores5 = new ArrayList<>();
        scores5.add(66.0); scores5.add(81.0); scores5.add(91.0);
        manager.put(new Student("201620035", "牛魔王", 56, scores5));

        // 显示所有学生
        System.out.println("所有学生信息:");
        manager.show();

        // 删除学生
        Student toRemove = manager.searching("201620035");
        if (toRemove != null) {
            manager.remove(toRemove);
            System.out.println("\n删除牛魔王后的学生信息:");
            manager.show();
        }

        // 查找学生
        Student found = manager.searching("20161119");
        if (found != null) {
            System.out.println("\n找到学生:");
            System.out.println(found);
        }
    }
}    